<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input class="btn" type="button" value="播放" onclick="OnClick()">
    <br>

    <input class="input" type="text" value="0">
    <input class="add" type="button" value="-1" onclick="Sub()">
    <input class="sub" type="button" value="+1" onclick="Add()">


</body>

<script>
    let btn = document.querySelector(".btn");
    function OnClick() {
        if (btn.value == "播放") {
            btn.value = "暂停";
        } else {
            btn.value = "播放";
        }
    }
    function Add() {
        //获取到事件源
        let input_element = document.querySelector(".input");
        input_element.value = parseInt(input_element.value) + 1;
    }

    function Sub() {
        //获取到事件源
        let input_element = document.querySelector(".input");
        input_element.value = parseInt(input_element.value) - 1;
    }
</script>

</html>